
import Config from  "@/config.js"; // 系统参数
import {
    request,
    uploadFile,
    uploadFiles
} from "./request.js"

// data: {
//     interfaceName: '',
//     param: {}
// }

export function login(data) {
    return request(Config.service.loginUrl, {
        method: 'post',
        data: data,
    })
}



export function deleteAccount(data) {
    return request(Config.service.deleteAccountUrl, {
        method: 'delete',
        data: data,
    })
}




export function loginApp(data) {
    return request(Config.service.loginAppUrl, {
        method: 'post',
        data: data,
    })
}
export function loginPhone(data) {
    return request(Config.service.loginPhoneUrl, {
        method: 'post',
        data: data,
    })
}

export function registerPhone(data) {
    return request(Config.service.registerPhoneUrl, {
        method: 'post',
        data: data,
    })
}


export function getLoginAuthCode(data) {
    return request(Config.service.getLoginAuthCodeUrl, {
        method: 'get',
        data: data,
    })
}

export function hasPermit(data) {
    return request(Config.service.interfacePermitUrl, {
        method: 'get',
        data: data,
    })
}
export function auditingChannelData(param) {
    return request(Config.service.auditingChannelDataUrl, {
        method: 'get',
        data: param,
    })
}
export function listSignupByChannel(param) {
    return request(Config.service.listSignupByChannelUrl, {
        method: 'get',
        data: param,
    })
}
export function auditChannelData(param) {
    return request(Config.service.auditChannelDataUrl, {
        method: 'put',
        data: param,
    })
}
export function transferSalesman(data) {
    return request(Config.service.transferSalesmanUrl, {
        method: 'post',
        data: data,
    })
}

export function loginOut(data) {
    return request(Config.service.loginOutUrl, {
        method: 'delete',
        data: data,
    })
}

export function createUserLog(data) {
    return request(Config.service.createUserLogUrl, {
        method: 'post',
        data: data,
    })
}
export function getDetailUserLog(data) {
    return request(Config.service.getDetailUserLogUrl, {
        method: 'get',
        data: data,
    })
}


export function updateUserLog(data) {
    return request(Config.service.updateUserLogUrl, {
        method: 'put',
        data: data,
    })
}

export function authUserInfo(data) {
    return request(Config.service.authUserInfoUrl, {
        method: 'get',
        data: data,
    })
}

export function authPhone(data) {
    return request(Config.service.authPhoneUrl, {
        method: 'post',
        data: data,
    })
}

export function authLocation(data) {
    return request(Config.service.authLocationUrl, {
        method: 'post',
        data: data,
    })
}



export function updateUserInfo(data) {
    return request(Config.service.updateUserInfoUrl, {
        method: 'post',
        data: data,
    })
}

export function getUserInfo(data) {

    return request(Config.service.getUserInfoUrl, {
        method: 'get',
        data: data,
    })
}

export function uploadAvatar(data) {
    return uploadFiles(Config.service.uploadAvatarUrl, {
        method: 'post',
        data: data,
    })
}
export function uploadWechatQrcode(data) {
    return uploadFiles(Config.service.updateSalesmanWechatQrcodeUrl, {
        method: 'post',
        data: data,
    })
}
export function getUserListByIds(data) {

    return request(Config.service.getUserListByIdsUrl, {
        method: 'post',
        data: data,
    })
}


export function bindOfficialAccount(data) {

    return request(Config.service.bindOfficialAccountUrl, {
        method: 'put',
        data: data,
    })
}


export function updateWechatCode(data) {

    return request(Config.service.updateWechatCodeUrl, {
        method: 'put',
        data: data,
    })
}

export function updatePersonSignature(data) {

    return request(Config.service.updatePersonSignatureUrl, {
        method: 'put',
        data: data,
    })
}

export function customerLogList(data) {
    return request(Config.service.customerLogListUrl, {
        method: 'get',
        data: data,
    })
}

export function getAllCustomerLogList(data) {
   return request(Config.service.getAllCustomerLogListUrl, {
        method: 'get',
        data: data,
   })
}

export function getOneCustomerLogList(data) {
   return request(Config.service.getOneCustomerLogListUrl, {
        method: 'get',
        data: data,
   })
}

export function getFollowLogList(data) {
   return request(Config.service.getFollowLogListUrl, {
        method: 'get',
        data: data,
   })
}

export function uploadFollowLogImage(data) {
   return uploadFiles(Config.service.uploadFollowLogImageUrl, {
        method: 'post',
        data: data,
   })
}


export function addFollowLog(data) {
   return request(Config.service.addFollowLogUrl, {
        method: 'post',
        data: data,
   })
}
export function deleteFollowLog(data) {
   return request(Config.service.deleteFollowLogUrl, {
        method: 'delete',
        data: data,
   })
}


export function getCustomerList(data) {
   return request(Config.service.getCustomerListUrl, {
        method: 'get',
        data: data,
   })
}
export function getCustomerDetail(data) {
   return request(Config.service.getCustomerDetailUrl, {
        method: 'get',
        data: data,
   })
}
export function markInvalid(data) {
    return request(Config.service.markInvalidUrl, {
        method: 'put',
        data: data,
    })
}
export function getCustomerAnalysisData(data) {
   return request(Config.service.getCustomerAnalysisDataUrl, {
        method: 'get',
        data: data,
   })
}

export function updateCustomerName(data) {
   return request(Config.service.updateCustomerNameUrl, {
        method: 'put',
        data: data,
   })
}

export function updateCustomerIntention(data) {
   return request(Config.service.updateCustomerIntentionUrl, {
        method: 'put',
        data: data,
   })
}

export function getCustomerByPhone(data) {
   return request(Config.service.getCustomerByPhoneUrl, {
        method: 'get',
        data: data,
   })
}
export function publicCustomers(data) {
   return request(Config.service.publicCustomersUrl, {
        method: 'get',
        data: data,
   })
}
export function bindCustomerById(data) {
   return request(Config.service.bindCustomerByIdUrl, {
        method: 'put',
        data: data,
   })
}

export function getSalesmanList(data) {
    return request(Config.service.getSalesmanListUrl, {
        method: 'get',
        data: data,
    })
}
export function statTodoList(data) {
    return request(Config.service.statTodoListUrl, {
        method: 'get',
        data: data,
    })
}
export function customerRank(data) {
    return request(Config.service.customerRankUrl, {
        method: 'get',
        data: data,
    })
}
export function bindSalesman(data) {
    return request(Config.service.bindSalesmanUrl, {
        method: 'put',
        data: data,
    })
}

export function getSalesmanDetail(data) {
    return request(Config.service.getSalesmanDetailUrl, {
        method: 'get',
        data: data,
    })
}
export function getSalesmanTeamDetail(data) {
    return request(Config.service.getSalesmanTeamDetailUrl, {
        method: 'get',
        data: data,
    })
}
export function getUserProps(data) {
    return request(Config.service.getUserPropsUrl, {
        method: 'get',
        data: data,
    })
}
export function updateUserProps(data) {
    return request(Config.service.updateUserPropsUrl, {
        method: 'put',
        data: data,
    })
}



export function getProjectInfo(data) {
	data.param.version = "v2"
    return request(Config.service.getProjectInfoUrl, {
        method: 'get',
        data: data,
    })
}
export function getProjectMetaInfo(data) {
    return request(Config.service.getProjectMetaInfoUrl, {
        method: 'get',
        data: data,
    })
}

export function getProjectModals(data) {
    return request(Config.service.getProjectModalsUrl, {
        method: 'get',
        data: data,
    })
}
export function getMultiProjectShare(data) {
    return request(Config.service.getMultiProjectShareUrl, {
        method: 'get',
        data: data,
    })
}

export function getHouseTypeList(data) {
    return request(Config.service.getHouseTypeListUrl, {
        method: 'get',
        data: data,
    })
}
export function getHouseTypeDetail(data) {
    return request(Config.service.getHouseTypeDetailUrl, {
        method: 'get',
        data: data,
    })
}

export function getProjectTraffic(data) {
    return request(Config.service.getProjectTrafficUrl, {
        method: 'get',
        data: data,
    })
}
export function getProjectVisitors(data) {
    return request(Config.service.getProjectVisitorsUrl, {
        method: 'get',
        data: data,
    })
}
export function getProjectMaterials(data) {
    return request(Config.service.getProjectMaterialsUrl, {
        method: 'get',
        data: data,
    })
}
export function listMaterials(data) {
    return request(Config.service.listMaterialsUrl, {
        method: 'get',
        data: data,
    })
}

export function getProjectNotes(data) {
    return request(Config.service.getProjectNotesUrl, {
        method: 'get',
        data: data,
    })
}
export function getProjectNotesDetail(data) {
    return request(Config.service.getProjectNotesDetailUrl, {
        method: 'get',
        data: data,
    })
}

export function getProjectAlbums(data) {
    return request(Config.service.getProjectAlbumsUrl, {
        method: 'get',
        data: data,
    })
}

export function getProjectAlbumDetail(data) {
    return request(Config.service.getProjectAlbumDetailUrl, {
        method: 'get',
        data: data,
    })
}

export function getProjectVideos(data) {
    return request(Config.service.getProjectVideosUrl, {
        method: 'get',
        data: data,
    })
}

export function getProjectVideoDetail(data) {
    return request(Config.service.getProjectVideoDetailUrl, {
        method: 'get',
        data: data,
    })
}

export function getProjectNews(data) {
    return request(Config.service.getProjectNewsUrl, {
        method: 'get',
        data: data,
    })
}

export function getProjectNewDetail(data) {
    return request(Config.service.getProjectNewDetailUrl, {
        method: 'get',
        data: data,
    })
}


export function switchShop(data) {
    return request(Config.service.switchShopUrl, {
        method: 'post',
        data: data,

    })
}
export function allocateCustomers(data) {
    return request(Config.service.allocateCustomersUrl, {
        method: 'post',
        data: data,

    })
}





export function getSceneInfo(data) {
    return request(Config.service.getSceneInfoUrl, {
        method: 'get',
        data: data,
    })
}

export function getIndexModal(){
    return request(Config.service.getIndexModal, {
        method: 'get',
    })
}

export function getActivityList(data) {
    return request(Config.service.getActivityListUrl, {
        method: 'get',
        data: data,
    })
}
export function unifiedOrder(data) {
    return request(Config.service.unifiedOrder, {
        method: 'post',
        data: data,
    })
}

export function getActivityDetail(data) {
    return request(Config.service.getActivityDetailUrl, {
        method: 'get',
        data: data,
    })
}


export function getMyActivityList(data) {
    return request(Config.service.getMyActivityListUrl, {
        method: 'get',
        data: data,
    })
}

export function attendActivity(data) {
    return request(Config.service.attendActivityUrl, {
        method: 'post',
        data: data,
    })
}

export function attendActivityLike(data) {
    return request(Config.service.attendActivityLikeUrl, {
        method: 'post',
        data: data,
    })
}
export function redeemActivityLike(data) {
    return request(Config.service.redeemActivityLikeUrl, {
        method: 'post',
        data: data,
    })
}
export function helpCutActivity(data) {
    return request(Config.service.helpCutActivityUrl, {
        method: 'post',
        data: data,
    })
}
export function getRedPacket(data) {
    return request(Config.service.getRedPacketUrl, {
        method: 'post',
        data: data,
    })
}

export function getActivityNoticeList(data) {
    return request(Config.service.getActivityNoticeListUrl, {
        method: 'get',
        data: data,
    })
}




export function getCurrentActivityAward(data) {
    return request(Config.service.getCurrentActivityAwardUrl, {
        method: 'get',
        data: data,
    })
}

export function getAllActivityAward(data) {
    return request(Config.service.getAllActivityAwardUrl, {
        method: 'get',
        data: data,
    })
}
export function getActivityAwardInfo(data) {
    return request(Config.service.getActivityAwardInfoUrl, {
        method: 'get',
        data: data,
    })
}



export function checkOffActivity(data) {
    return request(Config.service.checkOffActivityUrl, {
        method: 'put',
        data: data,
    })
}

export function getCheckOutInfo(data) {
    return request(Config.service.getCheckOutInfoUrl, {
        method: 'GET',
        data: data,
    })
}

export function getHomeActivity(data) {
    return request(Config.service.getHomeActivityUrl, {
        method: 'GET',
        data: data,
    })
}
export function checkReferrerRole(data) {
    console.log("checkRole",3)
    return request(Config.service.checkReferrerRoleUrl, {
        method: 'GET',
        data: data,
    })
}

export function attendHomeActivity(data) {
    return request(Config.service.attendHomeActivityUrl, {
        method: 'put',
        data: data,
    })
}

export function addCustomerHomeActivity(data) {
    return request(Config.service.addCustomerHomeActivityUrl, {
        method: 'post',
        data: data,
    })
}



export function getUserStatis(data) {
    return request(Config.service.getUserStatisUrl, {
        method: 'get',
        data: data,
    })
}
export function getMembers(data) {
    return request(Config.service.getMembersUrl, {
        method: 'get',
        data: data,
    })
}


export function getOssSignature(data) {
    return request(Config.service.getOssSignatureUrl, {
        method: 'get',
        data: data,
    })
}

export function getArticleList(data) {
    return request(Config.service.getArticleListUrl, {
        method: 'get',
        data: data,
    })
}
export function getArticleDetail(data) {
    return request(Config.service.getArticleDetailUrl, {
        method: 'get',
        data: data,
    })
}
export function getArticleQrcode(data) {
    return request(Config.service.getArticleQrcodeUrl, {
        method: 'get',
        data: data,
    })
}
export function addArticle(data) {
    return request(Config.service.addArticleUrl, {
        method: 'post',
        data: data,
    })
}
export function deleteArticle(data) {
    return request(Config.service.deleteArticleUrl, {
        method: 'delete',
        data: data,
    })
}

export function updateArticle(data) {
    return request(Config.service.updateArticleUrl, {
        method: 'put',
        data: data,
    })
}
export function importFromMpArticle(data) {
    return request(Config.service.importFromMpArticleUrl, {
        method: 'post',
        data: data,
    })
}



export function getArticleForRead(data) {
    return request(Config.service.getArticleForReadUrl, {
        method: 'put',
        data: data,
    })
}

//===公众号
export function postMessageByWechatOfficial(data) {
    return request(Config.service.postMessageByWechatOfficialUrl, {
        method: 'post',
        data: data,
    })
}











export function getShopEmployeeInfo(data) {
    return request(Config.service.getShopEmployeeInfoUrl, {
        method: 'get',
        data: data,
    })
}



export function getPosterList(data) {
    return request(Config.service.getPosterListUrl, {
        method: 'get',
        data: data,
    })
}
export function getPoster(data) {
    return request(Config.service.getPosterUrl, {
        method: 'get',
        data: data,
    })
}
export function addPoster(data) {
    return request(Config.service.addPosterUrl, {
        method: 'post',
        data: data,
    })
}
export function updatePoster(data) {
    return request(Config.service.updatePosterUrl, {
        method: 'put',
        data: data,
    })
}

export function deletePoster(data) {
    return request(Config.service.deletePosterUrl, {
        method: 'delete',
        data: data,
    })
}


// export function getTaskList(data) {
//     return request(Config.service.getTaskListUrl, {
//         method: 'get',
//         data: data,
//     })
// }

// export function getTaskInfo(data) {
//     return request(Config.service.getTaskInfoUrl, {
//         method: 'get',
//         data: data,
//     })
// }

// export function getTaskDetail(data) {
//     return request(Config.service.getTaskDetailUrl, {
//         method: 'get',
//         data: data,
//     })
// }


export function getImUserSign(data) {
    return request(Config.service.getImUserSignUrl, {
        method: 'get',
        data: data,
    })
}

export function getAudioUserSign(data) {
    return request(Config.service.getAudioUserSignUrl, {
        method: 'get',
        data: data,
    })
}



//===统计接口
export function getUserStatistic(data) {
    return request(Config.service.getUserStatisticUrl, {
        method: 'get',
        data: data,
    })
}
export function getUserStatisticHour(data) {
    return request(Config.service.getUserStatisticHourUrl, {
        method: 'get',
        data: data,
    })
}

export function getUserRankStatistic(data) {
    return request(Config.service.getUserRankStatisticUrl, {
        method: 'get',
        data: data,
    })
}
export function getContentStatistic(data) {
    return request(Config.service.getContentStatisticUrl, {
        method: 'get',
        data: data,
    })
}
export function getContentDetailStatistic(data) {
    return request(Config.service.getContentDetailStatisticUrl, {
        method: 'get',
        data: data,
    })
}
export function getShareStatistic(data) {
    return request(Config.service.getShareStatisticUrl, {
        method: 'get',
        data: data,
    })
}
export function getShareDetailStatistic(data) {
    return request(Config.service.getShareDetailStatisticUrl, {
        method: 'get',
        data: data,
    })
}

export function getTeamStatistic(data) {
    return request(Config.service.getTeamStatisticUrl, {
        method: 'get',
        data: data,
    })
}

export function getTeamSalesmanListStatistic(data) {
    return request(Config.service.getTeamSalesmanListStatisticUrl, {
        method: 'get',
        data: data,
    })
}
export function getTeamUserStatistic(data) {
    return request(Config.service.getTeamUserStatisticUrl, {
        method: 'get',
        data: data,
    })
}
export function getTeamUserStatisticHour(data) {
    return request(Config.service.getTeamUserStatisticHourUrl, {
        method: 'get',
        data: data,
    })
}


export function getTeamContentStatistic(data) {
    return request(Config.service.getTeamContentStatisticUrl, {
        method: 'get',
        data: data,
    })
}
export function getTeamShareStatistic(data) {
    return request(Config.service.getTeamShareStatisticUrl, {
        method: 'get',
        data: data,
    })
}

export function getActivityStatistic(data) {
    return request(Config.service.getActivityStatisticUrl, {
        method: 'get',
        data: data,
    })
}

export function getActivityRankStatistic(data) {
    return request(Config.service.getActivityRankStatisticUrl, {
        method: 'get',
        data: data,
    })
}

export function getTeamSalesmanShareList(data) {
    return request(Config.service.getTeamSalesmanShareListUrl, {
        method: 'get',
        data: data,
    })
}
export function goToEqxDetail(data) {
    return request(Config.service.goToEqxDetail, {
        method: 'get',
        data: data,
    })
}


export function getMyPoints(data) {
    return request(Config.service.getMyPointsUrl, {
        method: 'get',
        data: data,
    })
}

export function getMyPointsRecord(data) {
    return request(Config.service.getMyPointsRecordUrl, {
        method: 'get',
        data: data,
    })
}
export function getGoodsCategory(data) {
    return request(Config.service.getGoodsCategoryUrl, {
        method: 'get',
        data: data,
    })
}


export function getGoodsList(data) {
    return request(Config.service.getGoodsListUrl, {
        method: 'get',
        data: data,
    })
}

export function getGoodsDetail(data) {
    return request(Config.service.getGoodsDetailUrl, {
        method: 'get',
        data: data,
    })
}


export function getGoodsRedeem(data) {
    return request(Config.service.getGoodsRedeemUrl, {
        method: 'get',
        data: data,
    })
}

export function getGoodsRedeemRecord(data) {
    return request(Config.service.getGoodsRedeemRecordUrl, {
        method: 'get',
        data: data,
    })
}

export function getGoodsRedeemRecordDetail(data) {
    return request(Config.service.getGoodsRedeemRecordDetailUrl, {
        method: 'get',
        data: data,
    })
}

export function getPointsMallRule(data) {
    return request(Config.service.getPointsMallRuleUrl, {
        method: 'get',
        data: data,
    })
}





export function getTaskList(data) {
    return request(Config.service.getTaskListUrl, {
        method: 'get',
        data: data,
    })
}

export function getRedpacketNeedShare(data) {
    return request(Config.service.getRedpacketNeedShareUrl, {
        method: 'post',
        data: data,
    })
}
export function getRedpacketList(data) {
    return request(Config.service.getRedpacketListUrl, {
        method: 'get',
        data: data,
    })
}
export function openRedpacket(data) {
    return request(Config.service.openRedpacketUrl, {
        method: 'post',
        data: data,
    })
}

export function getRedpacketScrollMessages(data) {
    return request(Config.service.getRedpacketScrollMessagesUrl, {
        method: 'get',
        data: data,
    })
}



export function getHasRedpacket(data) {
    return request(Config.service.getHasRedpacketUrl, {
        method: 'post',
        data: data,
    })
}


export function getRedpacketConfig(data) {
    return request(Config.service.getRedpacketConfigUrl, {
        method: 'post',
        data: data,
    })
}




export function getThreeLogin(data) {
    return request(Config.service.getThreeLoginUrl, {
        method: 'post',
        data: data,
    })
}


export function getSignInQRcode(data) {
    return request(Config.service.getSignInQRcodeUrl, {
        method: 'get',
        data: data,
    })
}

export function getCustomerUpdatePhone(data) {
    return request(Config.service.getCustomerUpdatePhoneUrl, {
        method: 'post',
        data: data,
    })
}


export function updateChannelReportTime(data) {
    return request(Config.service.updateChannelReportTimeUrl, {
        method: 'post',
        data: data,
    })
}


export function getStatisticRecent(data){
    return request(Config.service.getStatisticRecentUrl, {
        method: 'get',
        data: data,
    })
}


export function getNoteList(data){
    return request(Config.service.getNoteListUrl, {
        method: 'get',
        data: data,
    })
}

export function getNoteDetail(data){
    return request(Config.service.getNoteDetailUrl, {
        method: 'get',
        data: data,
    })
}

export function getNoteCreate(data){
    return request(Config.service.getNoteCreateUrl, {
        method: 'post',
        data: data,
    })
}

export function getNoteUpate(data){
    return request(Config.service.getNoteUpateUrl, {
        method: 'post',
        data: data,
    })
}

export function getNoteDelete(data){
    return request(Config.service.getNoteDeleteUrl, {
        method: 'get',
        data: data,
    })
}


export function getNoteReserve(data){
    return request(Config.service.getNoteReserveUrl, {
        method: 'get',
        data: data,
    })
}



export function getNoteVisitData(data){
    return request(Config.service.getNoteVisitDataUrl, {
        method: 'get',
        data: data,
    })
}

export function getNoteStatistic(data){
    return request(Config.service.getNoteStatisticUrl, {
        method: 'get',
        data: data,
    })
}


export function getCalculatorList(data){
    return request(Config.service.getCalculatorListUrl, {
        method: 'get',
        data: data,
    })
}

export function createCalculator(data){
    return request(Config.service.createCalculatorUrl, {
        method: 'post',
        data: data,
    })
}

export function getCalculatorDetail(data){
    return request(Config.service.getCalculatorDetailUrl, {
        method: 'get',
        data: data,
    })
}

export function updateSalesmanCard(data){
    return request(Config.service.updateSalesmanCardUrl, {
        method: 'post',
        data: data,
    })
}


export function authTiktok(data){
    return request(Config.service.authTiktokUrl, {
        method: 'get',
        data: data,
    })
}

export function getTiktokPermission(data){
    return request(Config.service.getTiktokPermissionUrl, {
        method: 'get',
        data: data,
    })
}

export function editTiktokPermission(data){
    return request(Config.service.editTiktokPermissionUrl, {
        method: 'post',
        data: data,
    })
}

export function getTiktokVideoPage(data){
    return request(Config.service.getTiktokVideoPageUrl, {
        method: 'get',
        data: data,
    })
}

export function getTiktokVideoStat(data){
    return request(Config.service.getTiktokVideoStatUrl, {
        method: 'get',
        data: data,
    })
}

export function getTiktokVideoSimpleStat(data){
    return request(Config.service.getTiktokVideoSimpleStatUrl, {
        method: 'get',
        data: data,
    })
}


export function getSystemMessagePage(data){
    return request(Config.service.getSystemMessagePageUrl, {
        method: 'get',
        data: data,
    })
}

export function setSystemMessageRead(data){
    return request(Config.service.setSystemMessageReadUrl, {
        method: 'post',
        data: data,
    })
}

export function getSystemMessageUnreadNum(data){
    return request(Config.service.getSystemMessageUnreadNumUrl, {
        method: 'get',
        data: data,
    })
}

